package com.dj17.client.api;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import com.byl.jnitest.R;

public class ApiManager extends AppCompatActivity {

    // Used to load the 'native-lib' library on application startup.
    static {
        System.loadLibrary("native-lib");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Example of a call to a native method
        TextView tv = (TextView) findViewById(R.id.sample_text);
        tv.setText(encrypt("111111111111111111111111111"));

        Log.e("ssssssss", "22===" + tv.getText().toString());
    }

    private int alien(double n) {
        int c;
        for (c = 0; c < n; c++) {
            n = n - 1;
        }
        return c;
    }


    /**
     * A native method that is implemented by the 'native-lib' native library,
     * which is packaged with this application.
     */
    public native String encrypt(String string);
}
